package myJs

import myJs.myPkg.jquery.$
import scalatags.Text.all._

import scala.collection.immutable.SeqMap

/**
 * Created by yz on 13/11/2020
 */
object Tool {

  def refreshCheckboxView(map: SeqMap[String, String], idStr: String) = {
    val html = map.map { case (v, showV) =>
      label(marginRight := 15,
        input(`type` := "checkbox", checked, value := v, onclick := s"Utils.setColumns('${v}')", showV)
      )
    }.mkString
    $(s"#${idStr}").html(html)
  }


}
